package com.example.jetpackdemo

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.compose.Composable
import androidx.ui.core.Text
import androidx.ui.core.setContent
import androidx.ui.material.MaterialTheme
import androidx.ui.tooling.preview.Preview

class TestActivity : AppCompatActivity(){
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContent {
            MaterialTheme {
                Greeting("Android")
            }
        }
    }

    @Composable
    private fun Greeting(s: String) {
        Text(text = "Hello $s!")
    }

    @Composable
    fun DefaultPreview(){
        MaterialTheme{
            Greeting("Android")
        }
    }
}